/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GameAI;

import GameObject.Card;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author NGUYEN VAN TAM
 */
public class SelectingController {
    List<Card> lcard;
    int iMaxSelected;
    
    public void Init(int maxSelected)
    {
        iMaxSelected = maxSelected;
        lcard = new ArrayList<Card>();
    }
    
    public void Set(int maxSelected)
    {
        iMaxSelected = maxSelected;
    }
    
    public boolean AddSelectedCard(Card card)
    {
        if(card != null && iMaxSelected < lcard.size())
        {
            lcard.add(card);
            return true;
        }
        return false;
    }
}
